var cordova = require('cordova');

function AMapPlugin() {
}

AMapPlugin.prototype.getCurrentLocation = function (successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "AMapPlugin", "getCurrentLocation", []);
};

AMapPlugin.prototype.navigation = function (startPoint, wayPoints, endPoint, aMapNaviType, aMapPageType, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "AMapPlugin", 'navigation', [
  startPoint, 
  wayPoints,
  endPoint,
  aMapNaviType,
  aMapPageType]);
};
AMapPlugin.prototype.truckNavigation = function (startPoint, wayPoints, endPoint, aMapNaviType, aMapPageType,aMapCarInfo, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "AMapPlugin", 'truckNavigation', [
  startPoint, 
  wayPoints,
  endPoint,
  aMapNaviType,
  aMapPageType,
  aMapCarInfo]);
};
module.exports = new AMapPlugin();